<!DOCTYPE html>
<html>
<body>

<table border="1" width="1"><tr><td id="td">abc def</td></tr></table>

<script>
document.body.offsetWidth;
document.getElementById("td").appendChild(document.createTextNode("ghi"));
</script>

</body>
</html>